#/usr/bin/python
#-*-<coding=UTF-8>-*-

"""
本例展示了TestCtrl控件的使用
"""

import wx

class Frame(wx.Frame):
    
    def __init__(self):
        wx.Frame.__init__(self,parent=None,id=-1,title="",pos=wx.DefaultPosition,size=wx.DefaultSize)
        panel = wx.Panel(self)
        basicLabel = wx.StaticText(panel,-1,"basic control:")
        basicText = wx.TextCtrl(panel,-1,"I,ve entered some text!",size=(175,-1))
        basicText.SetInsertionPoint(0)

        pwdLabel = wx.StaticText(panel,-1,"password:")
        pwdText = wx.TextCtrl(panel,-1,"password",size=(175,-1),style=wx.TE_PASSWORD)

        sizer = wx.FlexGridSizer(cols=2,hgap=6,vgap=6)
        sizer.AddMany([basicLabel,basicText,pwdLabel,pwdText])
        panel.SetSizer(sizer)


if __name__ == "__main__":
    app = wx.PySimpleApp()
    frame = Frame()
    frame.Show()
    app.MainLoop()
